Skip to content

feat(syslog): fix syslog severity short-form aliases not recognized by encoder#279

Open
vparfonov wants to merge 1 commit into
ViaQ:v0.54.0-rhfrom
vparfonov:log9563
Open

feat(syslog): fix syslog severity short-form aliases not recognized by encoder#279
vparfonov wants to merge 1 commit into
ViaQ:v0.54.0-rhfrom
vparfonov:log9563

Conversation

@vparfonov

@vparfonov vparfonov commented Jul 1, 2026

Copy link
Copy Markdown

The syslog codec's Severity enum only accepts full-form keywords ("critical", "emergency", "informational", etc.) but the VRL functions to_syslog_severity and to_syslog_level use short-form keywords ("crit", "emerg", "info", etc.). When a short-form value reaches the syslog encoder, FromStr parsing fails silently and the severity falls back to the default Informational (6).

This adds strum serialize aliases so the encoder accepts both forms:

  • emerg / emergency / panic → Emergency (0)
  • crit / critical → Critical (2)
  • err / error → Error (3)
  • warn / warning → Warning (4)
  • info / informational → Informational (6)

ref: https://redhat.atlassian.net/browse/LOG-9563

depends on: openshift/cluster-logging-operator#3330

…y encoder

The Severity enum only accepted full-form names (e.g. "critical",
"emergency", "informational") but VRL functions to_syslog_severity and
to_syslog_level use short-form names ("crit", "emerg", "info"). This
caused user-configured severity values like "crit" to silently fall back
to "informational" (severity 6).

Add strum serialize aliases so the encoder accepts both short-form and
full-form severity names: emerg/emergency, crit/critical, err/error,
warn/warning, info/informational, and the deprecated "panic" alias.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Vitalii Parfonov <vparfono@redhat.com>
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 9f8671cd-fa18-4db5-bcf1-9312102c3077

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@vparfonov

Copy link
Copy Markdown
Author

upstream PR: vectordotdev#25731

@jcantrill jcantrill added the v0.54 label Jul 2, 2026
@jcantrill

Copy link
Copy Markdown
Member

/hold

@jcantrill

Copy link
Copy Markdown
Member

/approve

@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jcantrill, vparfonov

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved label Jul 2, 2026
@jcantrill

Copy link
Copy Markdown
Member

/override ci/prow/cluster-logging-operator-e2e

@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown

@jcantrill: Overrode contexts on behalf of jcantrill: ci/prow/cluster-logging-operator-e2e

Details

In response to this:

/override ci/prow/cluster-logging-operator-e2e

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@jcantrill

Copy link
Copy Markdown
Member

/lgtm

@vparfonov

Copy link
Copy Markdown
Author

/retest-required

@jcantrill

Copy link
Copy Markdown
Member

/hold cancel

@vparfonov

Copy link
Copy Markdown
Author

/test clo-functional

@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown

@vparfonov: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/clo-functional 27e14d4 link true /test clo-functional

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants